import React from 'react';
import { View, Swiper, SwiperItem, Image } from '@tarojs/components';
// import './index.module.scss';

const Carousel = (props) => {
  const toHref = (href) => {
    // window.open(href);
  };

  return (
    <View>
      <Swiper
        className="swiper-container"
        circular
        indicatorDots
        indicatorColor="#999"
        indicatorActiveColor="#bf708f"
        autoplay
      >
        <SwiperItem>
          <Image
            onClick={() => toHref('https://club.itianshu.cn/')}
            style={{ width: '100%', height: '100%' }}
            src="https://hmyimgs.oss-cn-beijing.aliyuncs.com/hmy/club/4.png"
            mode="aspectFill"
          ></Image>
        </SwiperItem>

        <SwiperItem>
          <Image
            onClick={() => toHref('https://www.itianshu.cn/')}
            style={{ width: '100%', height: '100%' }}
            src="https://hmyimgs.oss-cn-beijing.aliyuncs.com/hmy/club/5.png"
            mode="aspectFill"
          ></Image>
        </SwiperItem>
        <SwiperItem>
          <Image
            onClick={() => toHref('https://club.itianshu.cn/')}
            style={{ width: '100%', height: '100%' }}
            src="https://hmyimgs.oss-cn-beijing.aliyuncs.com/hmy/club/6.png"
            mode="aspectFill"
          ></Image>
        </SwiperItem>
      </Swiper>
    </View>
  );
};

export default Carousel;
